#pragma once
#include <winsock2.h>

// enum GL_PROGRAM_TARGET
#define GL_VERTEX_PROGRAM_ARB    0x8620
#define GL_FRAGMENT_PROGRAM_ARB  0x8804

// enum GL_PROGRAM_FORMAT
#define GL_PROGRAM_FORMAT_ASCII_ARB  0x8875

// enum GL_LIST_MODE
#define GL_COMPILE  0x1300

// enum GL_PRIMITIVE_TOPOLOGY
#define GL_PRIMITIVE_TOPOLOGY_POINT_LIST      0x0000 // GL_POINTS
#define GL_PRIMITIVE_TOPOLOGY_LINE_LIST       0x0001 // GL_LINES
#define GL_PRIMITIVE_TOPOLOGY_LINE_LOOP       0x0002 // GL_LINE_LOOP
#define GL_PRIMITIVE_TOPOLOGY_LINE_STRIP      0x0003 // GL_LINE_STRIP
#define GL_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST   0x0004 // GL_TRIANGLES
#define GL_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP  0x0005 // GL_TRIANGLE_STRIP
#define GL_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN    0x0006 // GL_TRIANGLE_FAN

// enum GL_ACTIVE_TEXTURE
#define GL_TEXTURE0  0x84C0

// enum GL_TEXTURE_TARGET
#define GL_TEXTURE_2D                   0x0DE1
#define GL_TEXTURE_CUBE_MAP             0x8513
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X  0x8515
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X  0x8516
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y  0x8517
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y  0x8518
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z  0x8519
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z  0x851A

// enum GL_TEXTURE_PARAMETER_NAME
#define GL_TEXTURE_MAG_FILTER      0x2800
#define GL_TEXTURE_MIN_FILTER      0x2801
#define GL_TEXTURE_WRAP_S          0x2802
#define GL_TEXTURE_WRAP_T          0x2803
#define GL_GENERATE_MIPMAP         0x8191
#define GL_TEXTURE_MAX_ANISOTROPY  0x84FE

// enum GL_TEXTURE_FILTER
#define GL_NEAREST                 0x2600
#define GL_LINEAR                  0x2601
#define GL_NEAREST_MIPMAP_NEAREST  0x2700
#define GL_LINEAR_MIPMAP_NEAREST   0x2701
#define GL_NEAREST_MIPMAP_LINEAR   0x2702
#define GL_LINEAR_MIPMAP_LINEAR    0x2703

// enum GL_TEXTURE_ADDRESS_MODE
#define GL_TEXTURE_ADDRESS_WRAP   0x2901 // GL_REPEAT
#define GL_TEXTURE_ADDRESS_CLAMP  0x812F // GL_CLAMP_TO_EDGE

// enum GL_PIXEL_STORE_PARAMETER_NAME
#define GL_UNPACK_ALIGNMENT  0x0CF5
#define GL_PACK_ALIGNMENT    0x0D05

// enum GL_TEXTURE_TEXEL_FORMAT
#define GL_ALPHA            0x1906
#define GL_RGB              0x1907
#define GL_RGBA             0x1908
#define GL_LUMINANCE        0x1909
#define GL_LUMINANCE_ALPHA  0x190A

// enum GL_TEXTURE_TEXEL_TYPE
#define GL_BYTE                    0x1400
#define GL_UNSIGNED_BYTE           0x1401
#define GL_SHORT                   0x1402
#define GL_UNSIGNED_SHORT          0x1403
#define GL_FLOAT                   0x1406
#define GL_UNSIGNED_SHORT_4_4_4_4  0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1  0x8034
#define GL_UNSIGNED_SHORT_5_6_5    0x8363

// enum GL_CLEAR_MASK
#define GL_DEPTH_BUFFER_BIT    0x00000100
#define GL_STENCIL_BUFFER_BIT  0x00000400
#define GL_COLOR_BUFFER_BIT    0x00004000

// enum GL_CULL_MODE
#define GL_CULL_MODE_NONE            0
#define GL_CULL_MODE_FRONT           0x0404 // GL_FRONT
#define GL_CULL_MODE_BACK            0x0405 // GL_BACK
#define GL_CULL_MODE_FRONT_AND_BACK  0x0408 // GL_FRONT_AND_BACK

// enum GL_FRONT_FACE
#define GL_FRONT_FACE_COUNTER_CLOCKWISE  0x0901 // GL_CCW
#define GL_FRONT_FACE_CLOCKWISE          0x0900 // GL_CW

// enum GL_COMPARE_OP
#define GL_COMPARE_OP_NEVER             0x0200 // GL_NEVER
#define GL_COMPARE_OP_LESS              0x0201 // GL_LESS
#define GL_COMPARE_OP_EQUAL             0x0202 // GL_EQUAL
#define GL_COMPARE_OP_LESS_OR_EQUAL     0x0203 // GL_LEQUAL
#define GL_COMPARE_OP_GREATER           0x0204 // GL_GREATER
#define GL_COMPARE_OP_NOT_EQUAL         0x0205 // GL_NOTEQUAL
#define GL_COMPARE_OP_GREATER_OR_EQUAL  0x0206 // GL_GEQUAL
#define GL_COMPARE_OP_ALWAYS            0x0207 // GL_ALWAYS

// enum GL_STENCIL_OP
#define GL_STENCIL_OP_KEEP                 0x1E00 // GL_KEEP
#define GL_STENCIL_OP_ZERO                 0      // GL_ZERO
#define GL_STENCIL_OP_REPLACE              0x1E01 // GL_REPLACE
#define GL_STENCIL_OP_INCREMENT_AND_CLAMP  0x1E02 // GL_INCR
#define GL_STENCIL_OP_DECREMENT_AND_CLAMP  0x1E03 // GL_DECR
#define GL_STENCIL_OP_INVERT               0x150A // GL_INVERT

// enum GL_LOGIC_OP
#define GL_LOGIC_OP_CLEAR          0x1500 // GL_CLEAR
#define GL_LOGIC_OP_AND            0x1501 // GL_AND
#define GL_LOGIC_OP_AND_REVERSE    0x1502 // GL_AND_REVERSE
#define GL_LOGIC_OP_COPY           0x1503 // GL_COPY
#define GL_LOGIC_OP_AND_INVERTED   0x1504 // GL_AND_INVERTED
#define GL_LOGIC_OP_NO_OP          0x1505 // GL_NOOP
#define GL_LOGIC_OP_XOR            0x1506 // GL_XOR
#define GL_LOGIC_OP_OR             0x1507 // GL_OR
#define GL_LOGIC_OP_NOR            0x1508 // GL_NOR
#define GL_LOGIC_OP_EQUIVALENT     0x1509 // GL_EQUIV
#define GL_LOGIC_OP_INVERT         0x150A // GL_INVERT
#define GL_LOGIC_OP_OR_REVERSE     0x150B // GL_OR_REVERSE
#define GL_LOGIC_OP_COPY_INVERTED  0x150C // GL_COPY_INVERTED
#define GL_LOGIC_OP_OR_INVERTED    0x150D // GL_OR_INVERTED
#define GL_LOGIC_OP_NAND           0x150E // GL_NAND
#define GL_LOGIC_OP_SET            0x150F // GL_SET

// enum GL_BLEND_FACTOR
#define GL_BLEND_FACTOR_ZERO                      0      // GL_ZERO
#define GL_BLEND_FACTOR_ONE                       1      // GL_ONE
#define GL_BLEND_FACTOR_SRC_COLOR                 0x0300 // GL_SRC_COLOR
#define GL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR       0x0301 // GL_ONE_MINUS_SRC_COLOR
#define GL_BLEND_FACTOR_DST_COLOR                 0x0306 // GL_DST_COLOR
#define GL_BLEND_FACTOR_ONE_MINUS_DST_COLOR       0x0307 // GL_ONE_MINUS_DST_COLOR
#define GL_BLEND_FACTOR_SRC_ALPHA                 0x0302 // GL_SRC_ALPHA
#define GL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA       0x0303 // GL_ONE_MINUS_SRC_ALPHA
#define GL_BLEND_FACTOR_DST_ALPHA                 0x0304 // GL_DST_ALPHA
#define GL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA       0x0305 // GL_ONE_MINUS_DST_ALPHA
#define GL_BLEND_FACTOR_CONSTANT_COLOR            0x8001 // GL_CONSTANT_COLOR
#define GL_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR  0x8002 // GL_ONE_MINUS_CONSTANT_COLOR
#define GL_BLEND_FACTOR_CONSTANT_ALPHA            0x8003 // GL_CONSTANT_ALPHA
#define GL_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA  0x8004 // GL_ONE_MINUS_CONSTANT_ALPHA
#define GL_BLEND_FACTOR_SRC_ALPHA_SATURATE        0x0308 // GL_SRC_ALPHA_SATURATE

// enum GL_BLEND_OP
#define GL_BLEND_OP_ADD               0x8006 // GL_FUNC_ADD
#define GL_BLEND_OP_SUBTRACT          0x800A // GL_FUNC_SUBTRACT
#define GL_BLEND_OP_REVERSE_SUBTRACT  0x800B // GL_FUNC_REVERSE_SUBTRACT
#define GL_BLEND_OP_MIN               0x8007 // GL_MIN
#define GL_BLEND_OP_MAX               0x8008 // GL_MAX

// enum GL_GET_PROGRAM_ERROR
#define GL_PROGRAM_ERROR_POSITION_ARB  0x864B
#define GL_PROGRAM_ERROR_STRING_ARB    0x8874

// enum GL_GET_ERROR
#define GL_NO_ERROR           0
#define GL_INVALID_ENUM       0x0500
#define GL_INVALID_VALUE      0x0501
#define GL_INVALID_OPERATION  0x0502
#define GL_STACK_OVERFLOW     0x0503
#define GL_STACK_UNDERFLOW    0x0504
#define GL_OUT_OF_MEMORY      0x0505
